{% extends 'base.html' %}

{% block title %}起风了{% endblock %}

{% block main %}
    <h2>博客列表</h2>
      <div class="row row-cols-2">
         {% for blog in blogs.all %}
          <div class="col mb-3">
              <div class="card text-center">
                  <div class="card-header d-flex">
                      <a href="#">{{ blog.title }}</a>
                   </div>
                   <div class="card-body">
                       <p class="card-text">{{ blog.content|safe }}</p>
                   </div>
                  <div class="card-footer text-muted d-flex justify-content-between">
                     <div>
                        <img src="{% static 'image/avatar.webp' %}" class="rounded-circle" height="30" width="30">
                         {{ blog.author }}
                     </div>
                      <div>
                         发布时间：{{ blog.pub_time|date:"Y年m月d日 h时i分"}}
                      </div>
                  </div>
              </div>
          </div>
       {% endfor %}
      </div>
{% endblock %}